home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 7 / BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso / Files / Tele / C / Comet2.1.3.cpt / Worksheet < prev    next >
Text File  |  1991-11-07  |  17KB  |  318 lines

  1. This is an MPW Worksheet for Comet; use the provided UserStartup 
  2. to automatically run AztecStartup.
  3.  
  4. Comet source organization:
  5.  
  6. Mostly as a result of historical evolution, the resources to make Comet
  7. are haphazardly split between several folders.  The top level of the
  8. hierarchy is assumed to be "{Boot}src:".
  9.  
  10.     Folder:
  11.     
  12.     Comet:      the bulk of the code 
  13.     emlib:      various other code and resources
  14.     include:    most of the include files
  15.     azInclude:  files to place in the Aztec azInclude directory.
  16.                 quickdraw.h was modified to support Color QuickDraw calls
  17.                 for older versions of Aztec, other files contain MacTCP includes
  18.     3270XCMD:   a DRVR for controlling Comet through the hyperface.c
  19.                 interface; UNUSED with multiple windows but could be fixed to work 
  20.                 NOTE:  this is written for MPW C, so AztecStartup should
  21.                 not be executed before trying to compile this.
  22.                 
  23. Probably the most confusing thing in Comet is the getcontext() and
  24. setcontext() calls in main.c, which maintain globals corresponding to
  25. the current input/output window/session's state.  "emdp" is the current window
  26. selected for input/output; "keydp" is the topmost window.
  27.  
  28. This was done to handle multiple
  29. windows without completely rewriting the fast-drawing assembly code 
  30. in zap.asm, which has no spare registers to save the current window
  31. structure pointer (almost invariably declared as "twp").  Various other
  32. variables are declared as globals also, in the hope of avoiding the 
  33. lousy code generated by the compiler for structure/pointer references
  34. (Aztec up to 3.6 invariably reloads the pointer, so referencing off
  35. A5 and loading/saving globals gives code that is faster
  36. and more compact--the hazard is that you must be careful not
  37. to modify/use the *window structure's variable* when it is in use
  38. as a global.  
  39.  
  40. NOTE that when you add variables to the window structure in em.h,
  41. you must recompile main.c also, so the structure is allocated enough
  42. memory.
  43.  
  44. Next most fearsome is the MacTCP interface.  Problems still exist
  45. with Asynchronous sends of whole 3270 screens, which MacTCP will
  46. send but *will not* resend.  It's unclear whether the interface
  47. can be fixed so that MacTCP will be happier.  MacTCP is not a happy
  48. piece of work to begin with...
  49.  
  50.  
  51. #useful search routines 
  52.  
  53. grep SENDBUFSIZE ::include:≈.h
  54.  
  55.             Set Exit 0
  56. grep 'cntl.h' ::emlib:≈.c
  57. grep 'cntl.h' ::Comet:≈.c
  58.             Set Exit 1
  59.  
  60.  
  61.  
  62. #make em library
  63.  
  64. cd {boot}src:emlib:
  65. Azmake LIB=hd:mpw:azLib: CFLAGS='-N ' em.lib > makeout
  66. makeout
  67.  
  68. #make 2.1 text window version
  69.  
  70. cd {boot}src:Comet:
  71. Azmake -f makefile2.1 LIB=hd:mpw:azLib: CFLAGS='-N -DMACTCP' > makeout
  72. makeout
  73.  
  74.  
  75.  
  76. # back up Comet onto MacII 40MB drive
  77. set exit 0
  78.  
  79. duplicate -y hd:src:Comet:Comet21 hde:src:Comet:Comet21
  80. duplicate -y hd:src:Comet:Comet21.dbg hde:src:Comet:Comet21.dbg
  81. echo "#Comet backup" > backuprecord9
  82. echo "#`date`" >> backuprecord9
  83. backup -a -c -n -p -t TEXT -from hd:src:include: -to hde:src:include: >> backuprecord9
  84. backup -a -c -n -p -t TEXT -from hd:src:Comet: -to hde:src:Comet: >> backuprecord9
  85. backup -a    -n -p -t rsrc -from hd:src:Comet: -to hde:src:Comet: >> backuprecord9
  86. backup -a -c -n -p -t TEXT -from hd:src:emlib: -to hde:src:emlib: >> backuprecord9
  87. backup -a    -n -p -t rsrc -from hd:src:emlib: -to hde:src:emlib: >> backuprecord9
  88. backup -a    -n -p -t FFIL -from hd:src:emlib: -to hde:src:emlib: >> backuprecord9
  89. backup -a    -n -p -t PNTG -from hd:src:emlib: -to hde:src:emlib: >> backuprecord9
  90.  
  91. backuprecord9
  92.  
  93.  
  94.  
  95. # backup Comet source onto floppies named "Comet"
  96.  
  97. NewFolder Comet:emlib:
  98. NewFolder Comet:include:
  99.  
  100. duplicate -y hd:src:Comet:Comet21 'Comet':Comet21 
  101. duplicate -y hd:src:Comet:Comet21.dbg 'Comet':Comet21.dbg
  102. echo "#Comet backup" > junk
  103. echo "#`date`" >> junk
  104. backup -a -c -d -n -p -t TEXT -from hd:src:include: -to 'Comet':include: > junk
  105.  
  106. backup -a -c -d -n -p -t TEXT -from hd:src:emlib: -to 'Comet':emlib: >> junk
  107. backup -a    -d -n -p -t rsrc -from hd:src:emlib: -to 'Comet':emlib: >> junk
  108. backup -a    -d -n -p -t FFIL -from hd:src:emlib: -to 'Comet':emlib: >> junk
  109. backup -a    -d -n -p -t PNTG -from hd:src:emlib: -to 'Comet':emlib: >> junk
  110.  
  111. junk
  112.  
  113. NewFolder Comet:Comet:
  114.  
  115. backup -a -c -d -n -p -t TEXT -from hd:src:Comet: -to 'Comet':Comet: > junk2
  116. backup -a    -d -n -p -t rsrc -from hd:src:Comet: -to 'Comet':Comet: >> junk2
  117.  
  118. junk2
  119.  
  120.  
  121. Here follow file listings with one-liners describing the contents:
  122.  
  123. cd hde:Comet2.1.3:
  124.  
  125.  
  126. files -l
  127. Name                  Type Crtr  Size    Flags      Last-Mod-Date     Creation-Date  
  128. --------------------  ---- ---- ------ ---------- ----------------- -----------------
  129. azInclude             Fldr Fldr    31K lvbspoImad 10/25/91  4:17 PM 10/25/91  4:16 PM
  130. Comet                 Fldr Fldr   929K lvbspoImad  11/7/91  3:59 PM  11/7/91  2:58 PM
  131. emlib                 Fldr Fldr   385K lvbspoImad  11/7/91  3:45 PM  11/7/91  2:58 PM
  132.     formerly the "emulator" library; placed in MPW:azLib:
  133. include               Fldr Fldr   112K lvbspoImad  11/7/91  4:00 PM  11/7/91  2:58 PM
  134. resize                TEXT MPS      2K lvbspoImad  3/27/91  9:54 AM  3/10/89  3:13 PM
  135.     handy script to resize a window
  136. UserStartup           TEXT MPS      3K lvbspOImad  11/7/91  3:30 PM  7/20/87 12:00 PM
  137. Worksheet             TEXT MPS     16K lvbspOImad  11/7/91  4:22 PM 12/18/87 12:00 PM
  138.     This Worksheet
  139.  
  140.     
  141. emlib:
  142.  
  143. files -l
  144. Name                  Type Crtr  Size    Flags      Last-Mod-Date     Creation-Date  
  145. --------------------  ---- ---- ------ ---------- ----------------- -----------------
  146. ascii.rsrc            rsrc ????     2K lvbspoImad  5/31/91  3:49 PM   6/1/88  2:54 PM
  147.     resources specific to ASCII telnet
  148. basic.rsrc            rsrc CUTE    88K lvbspoImad  7/26/91  1:01 PM  2/19/91 10:48 AM
  149.     basic resource file:  dialogs, etc.
  150. bigfont.dam           FFIL aca4    67K lvbspoImad  7/24/91  1:44 PM   3/3/91 11:24 PM
  151.     A Fontastic file containing the fonts
  152. blank.asm             TEXT dumv     3K lvbspoImad  6/26/90  1:27 AM  11/8/88  5:58 PM
  153.     UNUSED code to blank emulator screen areas quickly
  154. comet-fonts           FFIL DMOV    62K lvbspoImad  7/24/91  1:44 PM  5/28/91  4:06 PM
  155.     DAMover copy of the Comet fonts
  156. h19key.c              TEXT ????    10K lvbspoImad  7/31/91 10:48 AM  8/10/86  5:15 AM
  157.     code which drives a 25th line for input
  158. ibm.rsrc              rsrc ????     3K lvbspoImad  7/22/91  1:05 PM   6/1/88  2:54 PM
  159.     resources specific to IBM 3270
  160. icon.pict             PNTG PANT     3K lvbspoImad  3/24/89  1:54 PM  3/23/89  2:15 PM
  161. icon.rsrc             rsrc          1K lvbspoImad  3/28/86  4:36 PM  2/24/86  2:37 PM
  162.     Comet icon
  163. key.c                 TEXT ????    39K lvbspoImad   8/2/91  2:06 PM  8/13/86  1:36 AM
  164.     code for keymapping, manipulating key macro queue
  165. keypads               PNTG PANT    20K lvbspoImad  8/11/90  1:27 PM  4/12/89  3:04 PM
  166.     pictures of the keypads
  167. macinit.c             TEXT ????     4K lvbspoImad  6/25/91  1:59 PM 10/23/86  6:43 AM
  168.     initialize most global Mac Managers
  169. macro.c               TEXT ????    44K lvbspoImad  7/25/91 12:51 PM  10/2/86 12:37 AM
  170.     code to manage dialog for entering and dumping key macros
  171. makefile              TEXT ????     2K lvbspoImad  6/20/91  4:35 PM  8/13/86  2:28 AM
  172. makeout               TEXT MPS      2K lvbspoImad   8/2/91  2:07 PM  6/12/90  7:11 PM
  173. prettywind.c          TEXT ????    17K lvbspoImad   4/1/91  3:34 PM  10/8/86  1:58 AM
  174.     code to draw window frames, counters
  175. printf.c              TEXT ????     7K lvbspoImad 10/28/91  7:18 PM  9/22/86  4:52 AM
  176.     icky printf routines deriving from PC-IP:  WARNING may not
  177.         act like the printf to which you are accustomed!
  178.         The %A internet address string interpretation seems to be the
  179.         only benefit from using this...
  180. setscript.asm         TEXT MPS      3K lvbspoImad  2/22/91 10:14 AM  6/16/90 11:05 AM
  181.     assembly language interface to Mac Script Mgr to set Script
  182. shrink.pict           PNTG PANT     2K lvbspoImad  3/23/89  3:56 PM  3/23/89  3:56 PM
  183. tape.pict             PNTG MPNT     2K lvbspoImad   4/1/91  3:02 PM   4/1/91  3:02 PM
  184.     more pictures which are pasted into the .rsrc files
  185. telnet.rsrc           rsrc ????     4K lvbspoImad   7/1/91  2:09 PM  4/12/88  2:28 PM
  186.     resources specific to Telnet
  187.  
  188. cd ::Comet
  189. files -l
  190. Name                  Type Crtr  Size    Flags      Last-Mod-Date     Creation-Date  
  191. --------------------  ---- ---- ------ ---------- ----------------- -----------------
  192. !changes              TEXT MPS     43K lvbspoImad  11/7/91  2:32 PM  8/31/90 11:04 AM
  193. !TODO                 TEXT MPS     11K lvbspoImad 10/30/91  4:58 PM  10/8/91 11:25 AM
  194. 3270com.c             TEXT dumv    29K lvbspoImad  8/22/91  1:51 PM   5/9/88  1:48 PM
  195.     the 3270 command parser
  196. 3270token.c           TEXT ????    20K lvbspoImad  7/26/91 10:56 AM  8/25/86  4:48 AM
  197.     interprets 3270 keyboard macros
  198. asciidraw.c           TEXT MPS     30K lvbspoImad   7/8/91  1:39 PM  6/11/90  1:51 PM
  199.     draws/updates Heath-19 and VT100 screens, contains common functions
  200. asciitoken.c          TEXT ????    17K lvbspoImad  8/21/91  1:35 PM  10/6/86  2:03 AM
  201.     interprets ASCII keyboard macros
  202. Comet2.1.r            TEXT ????     2K lvbspoImad   9/4/91  2:56 PM  8/15/86  2:56 AM
  203.     Redit file which controls the assembly of the Comet application
  204. CometCopy.c           TEXT dumv     2K lvbspoImad  4/25/91  4:13 PM  8/14/90 11:59 AM
  205.     Copyright notice
  206. config.c              TEXT ????    34K lvbspoImad  11/7/91  2:30 PM  9/26/86  1:12 AM
  207.     gets configuration from documents, and globals from "Comet Default"
  208. dialog.c              TEXT MPS     68K lvbspoImad 10/22/91  3:08 PM  2/16/91 12:57 PM
  209.     almost all of the dialogs
  210. DNR.c                 TEXT MPS      7K lvbspoImad  5/23/91 12:01 PM 11/14/88  3:45 PM
  211.     sample MacTCP DNR code
  212. emcursor.c            TEXT ????    36K lvbspoImad 10/31/91  4:50 PM 12/15/86  9:22 AM
  213.     cursor tracking/selection for all windows
  214. event.c               TEXT ????    69K lvbspoImad 10/22/91  3:13 PM 12/12/86  4:02 PM
  215.     almost all Mac-related routines, including the main event loop
  216. ft.c                  TEXT dumv    23K lvbspoImad  4/23/91 12:50 PM  2/26/88  7:28 PM
  217.     3270-specific file transfer, WARNING:  may induce brain damage!
  218. gethost.c             TEXT ????    18K lvbspoImad  9/25/91  2:27 PM  10/7/86 12:01 AM
  219.     parses host strings, calls DNR
  220. h19.c                 TEXT dumv    16K lvbspoImad 10/17/91  5:13 PM   4/7/89  7:01 PM
  221.     the Heath-19 emulator
  222. hyperface.c           TEXT MPS     10K lvbspoImad  9/13/90  4:39 PM 11/17/89  2:46 PM
  223.     UNUSED interface for Comet driver.
  224. icon.rsrc             rsrc          1K lvbspoImad 12/20/90  9:08 AM  2/24/86  2:37 PM
  225.     the Comet icon
  226. mactcp.c              TEXT MPS     32K lvbspoImad  8/16/91 11:57 AM 11/16/88  1:35 PM
  227. mactcp.h              TEXT MPS      2K lvbspoImad   5/1/91  3:01 PM   4/3/90  2:38 PM
  228.     the MacTCP interface code
  229. main.c                TEXT ????    40K lvbspoImad 10/22/91  3:10 PM 12/12/86  4:01 PM
  230.     top-level connection creation & service loops
  231. makefile2.1           TEXT ????     6K lvbspoImad 10/22/91  1:44 PM  9/29/86  1:35 AM
  232.     the makefile
  233. makeout               TEXT MPS      2K lvbspoImad  11/7/91  2:48 PM  6/24/91  5:52 PM
  234.     output of makefile directed into this file for execution
  235. menu.c                TEXT MPS     69K lvbspoImad 10/30/91  4:35 PM 11/30/89  5:18 PM
  236. menudefs.h            TEXT dumv     8K lvbspoImad 10/30/91  3:56 PM  8/11/87  4:15 PM
  237.     controls display and selection of menu items
  238. net_utils.asm         TEXT ????     3K lvbspoImad 12/13/89  3:46 PM  4/11/86  4:18 PM
  239.     Internet checksum, byteswapping
  240. nnr.c                 TEXT dumv     3K lvbspoImad   9/3/91  4:09 PM  2/12/87  6:09 AM
  241.     UNUSED runs dialog when connection experiences resends
  242. screen.c              TEXT dumv    42K lvbspoImad   9/4/91  1:39 PM 10/21/87  2:47 PM
  243.     master screen event handler, also 3270 screen drawing
  244. scrinit.c             TEXT ????    39K lvbspoImad   7/8/91  2:03 PM   5/5/86  5:02 PM
  245.     window creation, screen management; gets screen RAM locations for zap.asm
  246. serial.c              TEXT MPS     15K lvbspoImad 10/30/91  3:58 PM  6/22/90  5:37 PM
  247.     serial connection code
  248. telnet.c              TEXT ????    16K lvbspoImad  9/25/91  1:10 PM  8/10/86  5:36 AM
  249.     Telnet layer
  250. textedit.c            TEXT MPS     26K lvbspoImad  6/25/91  1:25 PM 10/24/91  9:34 AM
  251.     controls TextEdit window (.edit)
  252. tftp.h                TEXT ????     8K lvbspoImad  2/11/91  9:10 PM  4/14/86  9:36 AM
  253. tftp_common.c         TEXT MPS      4K lvbspoImad  9/26/90  3:08 PM  7/29/90  4:23 PM
  254. tftp_srv.c            TEXT ????    14K lvbspoImad   5/6/91  1:38 PM 10/24/86  3:33 AM
  255. tftp_util.c           TEXT ????    19K lvbspoImad  2/11/91  9:02 PM 12/15/86 10:43 AM
  256.     TFTP files, _common is UNUSED
  257. timer.c               TEXT MPS     13K lvbspoImad  7/26/90 12:23 PM  7/24/89  2:50 PM
  258.     manages timing for macros, etc.
  259. tninit.asm            TEXT MPS      2K lvbspoImad  6/13/90 10:30 AM 11/28/88 10:11 AM
  260.     initializes A5
  261. token.c               TEXT ????    13K lvbspoImad 10/30/91  4:34 PM  10/6/86  2:03 AM
  262.     master token (key macro) service loop, higher-level routines
  263. util.c                TEXT ????     7K lvbspoImad  2/16/91  1:10 PM  8/27/86  1:07 AM
  264.     misc routines, including queueing
  265. vt100.c               TEXT dumv    32K lvbspoImad   7/2/91 12:13 PM  6/22/87  4:18 PM
  266.     vt100 emulator
  267. xlate.h               TEXT ????    22K lvbspoImad  7/24/91 11:54 AM   1/7/91  5:02 PM
  268.     3270-ASCII translate tables
  269. zap.asm               TEXT ????    57K lvbspOImad   2/7/91 11:20 AM  4/24/86  8:45 AM
  270.     Assembly language routines for faster screen drawing
  271.     
  272. cd ::include
  273. files -l
  274. Name                  Type Crtr  Size    Flags      Last-Mod-Date     Creation-Date  
  275. --------------------  ---- ---- ------ ---------- ----------------- -----------------
  276. 3270.h                TEXT ????     8K lvbspoImad  7/24/91  2:03 PM  8/29/86  2:36 AM
  277. 3270vars.h            TEXT ????     3K lvbspoImad  6/13/90  8:31 PM  7/23/86  4:55 AM
  278. cntl.h                TEXT ????     2K lvbspoImad 10/12/89  2:56 PM  4/11/86  3:51 PM
  279. cntldefs.h            TEXT ????     2K lvbspoImad  7/21/90  2:48 PM   8/5/86  2:25 AM
  280. config.h              TEXT ????     5K lvbspoImad  11/7/91  2:32 PM  8/26/86  2:55 AM
  281. custom.h              TEXT ????     4K lvbspoImad  4/15/88  2:08 PM  7/17/86  2:10 AM
  282. em.h                  TEXT ????    28K lvbspOImad 10/22/91  3:11 PM  4/11/86  3:52 PM
  283.     contains the master window structure definition, used universally
  284. emdefs.h              TEXT ????     6K lvbspoImad  6/26/91  4:10 PM  4/11/86  3:57 PM
  285. ft.h                  TEXT ????     4K lvbspoImad  6/20/91  2:20 PM   8/6/87  3:09 PM
  286. h19.h                 TEXT ????     3K lvbspoImad 10/23/91 10:15 AM  5/21/86  6:35 PM
  287. key.h                 TEXT ????     3K lvbspoImad   8/3/90  1:40 PM  8/13/86  1:38 AM
  288. macdefs.h             TEXT ????     3K lvbspoImad 12/19/91  2:16 PM  8/22/86  1:48 AM
  289.     Mac low-memory globals
  290. net.h                 TEXT ????     6K lvbspoImad  7/26/90  2:45 PM  4/11/86  4:02 PM
  291. notice.h              TEXT ????     3K lvbspoImad  11/7/91  3:17 PM  4/11/86  4:10 PM
  292. q.h                   TEXT ????     5K lvbspoImad  10/4/89  2:34 PM  8/13/86  9:28 AM
  293. rcodes.h              TEXT ????     6K lvbspoImad 10/17/91  5:37 PM  10/6/86  2:00 AM
  294.     token/key macro codes defined
  295. resdefs.h             TEXT ????     4K lvbspoImad  6/24/91  6:50 PM  8/18/86  4:02 AM
  296.     important resource numbers defined here
  297. task.h                TEXT ????     3K lvbspoImad  5/11/90  5:20 PM  4/11/86  4:14 PM
  298. telnet.h              TEXT ????     5K lvbspoImad  3/28/91  9:12 AM  7/23/86 11:52 PM
  299. tftp.defs             TEXT ????     2K lvbspoImad  4/11/86  4:15 PM  4/11/86  4:15 PM
  300. tftp.h                TEXT ????     2K lvbspoImad  7/29/90  5:26 PM  4/11/86  4:15 PM
  301. timer.h               TEXT ????     3K lvbspoImad  1/31/90  4:24 PM  4/11/86  4:15 PM
  302. util.h                TEXT dumv     2K lvbspoImad  4/14/88  2:44 PM  4/14/88  2:44 PM
  303.  
  304. cd ::azInclude
  305. files -l
  306. Name                  Type Crtr  Size    Flags      Last-Mod-Date     Creation-Date  
  307. --------------------  ---- ---- ------ ---------- ----------------- -----------------
  308. quickdraw.h           TEXT ????    15K lvbspoImad  7/10/91  1:19 PM  6/10/88  2:04 PM
  309.     Color QuickDraw and other calls may be needed for older Aztec C versions
  310. GetMyIPAddr.h         TEXT MPS      1K lvbspoImad  3/28/89 12:00 PM  3/28/89 12:00 PM
  311. MacTCPCommonTypes.h   TEXT MPS      5K lvbspoImad  10/4/89  2:26 PM  3/28/89 12:00 PM
  312. TCPPB.h               TEXT MPS      7K lvbspoImad  8/21/91  1:51 PM  3/28/89 12:00 PM
  313. UDPPB.h               TEXT MPS      3K lvbspoImad  10/4/89  2:19 PM  3/28/89 12:00 PM
  314.     MacTCP defines modified for non-ANSI C Aztec versions
  315.  
  316.  
  317.  
  318.